<template>
	<view class="">
		<!-- 顶部导航 -->
		<nav-top :title="navTitle" :type="navType" />
		<nav-background :url="navActive==='takeaway'?takeawayBackground:takeInBackground" :imageHeight="navTopBackgroundImageHeight" />
		<!-- 导航下部内容区域 -->
		<view class="content">
			<view class="nav">
				<view :class="{active:navActive==='takeaway'}" @click="navActive='takeaway'">
					外卖
				</view>
				<view :class="{active:navActive==='takein'}" @click="navActive='takein'">
					堂食 
				</view>
			</view>
			<view class="store-list">
				<!-- <ListHome :listData="listData" /> -->
				暂无~
			</view>	
		</view>
	</view> 
</template>

<script setup>
	import takeawayBackground from "@/static/images/tabBar/takeawayBackground@2x.png"
	import takeInBackground from "@/static/images/tabBar/tekeInBackground@2x.png"
	import request from "@/Api/request.js" 
	import {
		reactive,
		ref
	} from "vue"
	import {
		onLoad
	} from "@dcloudio/uni-app"
	const navTitle = ""
	const navType = "commen"
	const navTopBackgroundImageHeight = 360
	const navActive = ref("")
	const listData = reactive([])
	const orderType = "comprehensive"
	const takeaway = false
	onLoad((options) => {
		navActive.value = options?.type
	})
	request({
		url:`/index?orderType=${orderType}&dineIn=${true}&offlinePickUp=${orderType}&takeaway=${true}`,
		method:"GET"
	}).then((res)=>{
		
		console.log(navActive.value,res);
	})
</script>

<style lang="scss" scoped>
	@import "@/static/css/commen.scss";

	.content {
		margin-top: 220rpx;
		border-radius: 24rpx 24rpx 0 0;

		.nav {
			height: 96rpx;
			background: #ffffff;
			border-radius: 24rpx 24rpx 0 0;
			display: flex;
			justify-content: space-around;
			align-items: center;

			view {
				@include font-base(32rpx, #666666, 400);
			}

			.active {
				@include font-base(32rpx, #333333, 600)
			}
		}

		.store-list{
			display: flex;
			margin-top: 300rpx;
			justify-content: center;
			align-items: center;
		}
	}
</style>